package com.so206.po;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

public class ProxyRecord implements Serializable {
    private Long id;

    /**
    * 关联订单id
    */
    private Long orderId;

    /**
    * 用户id
    */
    private Long uid;

    /**
    * 返利金额
    */
    private BigDecimal changeMoney;

    /**
    * 创建时间
    */
    private Date createTime;

    /**
    * 修改时间
    */
    private Date optTime;

    /**
    * 下级用户PID
    */
    private Long srcUid;

    /**
    * 订单金额
    */
    private BigDecimal orderMoney;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Long getUid() {
        return uid;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }

    public BigDecimal getChangeMoney() {
        return changeMoney;
    }

    public void setChangeMoney(BigDecimal changeMoney) {
        this.changeMoney = changeMoney;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getOptTime() {
        return optTime;
    }

    public void setOptTime(Date optTime) {
        this.optTime = optTime;
    }

    public Long getSrcUid() {
        return srcUid;
    }

    public void setSrcUid(Long srcUid) {
        this.srcUid = srcUid;
    }

    public BigDecimal getOrderMoney() {
        return orderMoney;
    }

    public void setOrderMoney(BigDecimal orderMoney) {
        this.orderMoney = orderMoney;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", orderId=").append(orderId);
        sb.append(", uid=").append(uid);
        sb.append(", changeMoney=").append(changeMoney);
        sb.append(", createTime=").append(createTime);
        sb.append(", optTime=").append(optTime);
        sb.append(", srcUid=").append(srcUid);
        sb.append(", orderMoney=").append(orderMoney);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ProxyRecord other = (ProxyRecord) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId()))
            && (this.getUid() == null ? other.getUid() == null : this.getUid().equals(other.getUid()))
            && (this.getChangeMoney() == null ? other.getChangeMoney() == null : this.getChangeMoney().equals(other.getChangeMoney()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getOptTime() == null ? other.getOptTime() == null : this.getOptTime().equals(other.getOptTime()))
            && (this.getSrcUid() == null ? other.getSrcUid() == null : this.getSrcUid().equals(other.getSrcUid()))
            && (this.getOrderMoney() == null ? other.getOrderMoney() == null : this.getOrderMoney().equals(other.getOrderMoney()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
        result = prime * result + ((getUid() == null) ? 0 : getUid().hashCode());
        result = prime * result + ((getChangeMoney() == null) ? 0 : getChangeMoney().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getOptTime() == null) ? 0 : getOptTime().hashCode());
        result = prime * result + ((getSrcUid() == null) ? 0 : getSrcUid().hashCode());
        result = prime * result + ((getOrderMoney() == null) ? 0 : getOrderMoney().hashCode());
        return result;
    }
}